From: Michael Catanzaro Date: Sun, 27 Jul 2025 12:07:27 +0000 (+0200) Subject: portalHelper: Rename Done signal to StatusChanged X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~88^2~9^2^2~38 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f6133f83cb0b5eae895544d8789e55c5e55cbf84;p=gnome-shell.git portalHelper: Rename Done signal to StatusChanged The name Done is incorrect because the result type may be RECHECK. In this case, we are not done. Part-of: (cherry picked from commit 387911c5154fcd86b98c103ddaa365e1aa563e48) --- diff --git a/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml b/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml index 8c6a13ebd..dca9cca17 100644 --- a/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml +++ b/data/dbus-interfaces/org.gnome.Shell.PortalHelper.xml @@ -11,7 +11,7 @@ - + diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index 1a5c644dc..5ae536c3b 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -109,7 +109,7 @@ class PortalSecurityButton extends Gtk.MenuButton { const PortalWindow = GObject.registerClass( class PortalWindow extends Gtk.ApplicationWindow { - _init(application, url, timestamp, doneCallback) { + _init(application, url, timestamp, statusChangedCallback) { super._init({ application, title: _('Hotspot Login'), @@ -132,7 +132,7 @@ class PortalWindow extends Gtk.ApplicationWindow { this._uri = GLib.Uri.parse(url, HTTP_URI_FLAGS); this._everSeenRedirect = false; this._originalUrl = url; - this._doneCallback = doneCallback; + this._statusChangedCallback = statusChangedCallback; this._lastRecheck = 0; this._recheckAtExit = false; @@ -181,9 +181,9 @@ class PortalWindow extends Gtk.ApplicationWindow { vfunc_close_request() { if (this._recheckAtExit) - this._doneCallback(PortalHelperResult.RECHECK); + this._statusChangedCallback(PortalHelperResult.RECHECK); else - this._doneCallback(PortalHelperResult.CANCELLED); + this._statusChangedCallback(PortalHelperResult.CANCELLED); return false; } @@ -242,7 +242,7 @@ class PortalWindow extends Gtk.ApplicationWindow { if (uri.get_host() === CONNECTIVITY_CHECK_HOST && this._everSeenRedirect) { // Yay, we got to gnome! decision.ignore(); - this._doneCallback(PortalHelperResult.COMPLETED); + this._statusChangedCallback(PortalHelperResult.COMPLETED); return true; } else if (uri.get_host() !== CONNECTIVITY_CHECK_HOST) { this._everSeenRedirect = true; @@ -268,7 +268,7 @@ class PortalWindow extends Gtk.ApplicationWindow { if (shouldRecheck) { this._lastRecheck = now; this._recheckAtExit = false; - this._doneCallback(PortalHelperResult.RECHECK); + this._statusChangedCallback(PortalHelperResult.RECHECK); } else { this._recheckAtExit = true; } @@ -358,7 +358,7 @@ class WebPortalHelper extends Adw.Application { return; top.window = new PortalWindow(this, top.url, top.timestamp, result => { - this._dbusImpl.emit_signal('Done', new GLib.Variant('(ou)', [top.connection, result])); + this._dbusImpl.emit_signal('StatusChanged', new GLib.Variant('(ou)', [top.connection, result])); }); } }); diff --git a/js/ui/status/network.js b/js/ui/status/network.js index 7e06775d7..c411afec0 100644 --- a/js/ui/status/network.js +++ b/js/ui/status/network.js @@ -2015,7 +2015,7 @@ class CaptivePortalHandler extends Signals.EventEmitter { Main.panel.closeCalendar(); } - _portalHelperDone(parameters) { + _portalHelperStatusChanged(parameters) { const [path, result] = parameters; if (result === PortalHelperResult.CANCELLED) { @@ -2041,9 +2041,9 @@ class CaptivePortalHandler extends Signals.EventEmitter { g_interface_name: PortalHelperInfo.name, g_interface_info: PortalHelperInfo, }); - this._portalHelperProxy.connectSignal('Done', + this._portalHelperProxy.connectSignal('StatusChanged', (proxy, emitter, params) => { - this._portalHelperDone(params); + this._portalHelperStatusChanged(params); }); try {